<template>
  <view>
    <uni-popup ref="popup" type="center" @close="onPopupClose">
      <view class="delete-popup">

        <view class="delete-message">当前暂未实名认证，前往认证可接、发布兼职心愿。是否前往认证</view>
        <view class="delete-buttons">
          <view class="cancel-btn" @click="onCancel">暂不认证</view>
          <view class="confirm-btn" @tap="onConfirm">确认前往</view>
        </view>
      </view>
    </uni-popup>
  </view>
</template>

<script>
export default {
  data() {
    return {
    };

  },
  methods: {
    // 打开弹窗
    openPopup() {
      if (this.$refs.popup) {
        this.$refs.popup.open();
      }
    },
    // 关闭弹窗
    onPopupClose() {
      console.log('弹窗已关闭');
    },
    // 暂不认证按钮点击事件
    onCancel() {
      this.$refs.popup.close();
      console.log('用户选择暂不认证');
    },
    // 确认前往按钮点击事件
    onConfirm() {
      this.$refs.popup.close();
      console.log('用户选择确认前往认证');
      // 这里可以跳转到认证页面
      uni.navigateTo({
        url: '/pages/pageMy/Authn/Authn',
      })

    }
  }
}
</script>

<style lang="scss">
.delete-popup {
  width: 598rpx;
  height: 222rpx;
  background: #FFFFFF;
  border-radius: 26rpx;
  padding: 10rpx 0rpx;


  .delete-message {

    text-align: center;
   margin: 0 20rpx;
    font-family: Source Han Sans CN;
    font-weight: 500;
    font-size: 30rpx;
    color: #000000;
    padding-top: 30rpx;
    

  }

  .delete-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 30rpx;
    border-top: 1rpx solid #CDCDCD;
    font-family: Source Han Sans CN;
    font-weight: 500;
    font-size: 32rpx;


    .cancel-btn {
      flex: 1;
      width: 224px;
      height: 90rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      color: #A3A6B7;
      border-right: 1rpx solid #CDCDCD;
    }

    .confirm-btn {
      flex: 1;
      width: 224rpx;
      height: 90rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      color: #2E66F7;


    }
  }
}
</style>
